|
|
|
| Private Sub chkBonus_Click()
cmdSave.Enabled = True
End Sub
Private Sub chkHealth_Click()
cmdSave.Enabled = True
End Sub |  | Once again, the Click( ) event of check boxes should enable the Save command buttons Enabled property. |
|
|
|
|
|
|
The picture control can respond to the graphic changing or the user clicking the picture. The most common event will be the user clicking the picture control. |
|
|
|
|
|
|
|
|
The Picture_Click( ) Event |
|
|
|
|
|
|
|
|
In the Employee Information form, you created a picture that displays an envelope graphic. This graphic may be used to send some email to an employee. In the Click() event, you would write code to send that email. Lets simulate that here by writing the following code: |
|
|
|
 |
|
|
|
|
Private Sub picMail_Click()
' Send Email here
frmEMail.Show
End Sub |
|
|
|
|
|
|
|
|
Lets create another form, called frmEmail, and use it to fill in the email information (see Figure 5.2). You can call any form from any other form by simply specifying the name of the form followed by a period and then the Show method. |
|
|
|
|
|
|
|
|
Figure 5.2
The Email form. |
|
|
|
|
|